<?
class Monster
{
  public $hp = 200;

  public function run(){
    echo "monster run....";
  }
  public function fire($act){
    echo "monster fire....";
    $act->hp = $act->hp - 5;
  }
}
$act = new Actor;
$monsters = array();
for($i=0;$i++){
  $monsters[] =new monsters;
}
//像怪物发起第一次攻击
//var_dump($monsters);
$act->fire($monster[0]);
e("act:"$act->hp);
e("monsters:"$monsters[0]->hp");
?>
